import fetch from '@/utils/request';
import Index from './index.js'

/**
 * 分销订单对象
 * @module DistributionOrder
 */
class DistributionOrder extends Index {

	constructor(path, distributionPath) {
		super(path);
		this.distributionPath = distributionPath;
	};
	/**
	 * @function query
	 * @description 查询分销订单
	 * @param  {Object} query 查询参数对象
	 * @param  {Object} param 分页参数对象
	 */
	query = (query, param) => fetch.request({
		url: `${this.distributionPath}/query`,
		method: 'POST',
		data: {
			query: query,
			param: param
		},
	});
}

export default new DistributionOrder("/api/user/order", "/api/user/sale/order");